package com.gzx.plugin.data.wxjk.sync.dao;

import com.gzx.plugin.data.wxjk.sync.pojo.SssjOverdueInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OverdueInfoDao {


    @Insert("<script>" +
            "INSERT INTO data_wxjk_sssjOverdueInfo(" +
            "    business_id," +
            "    bill_month," +
            "    over_principal," +
            "    over_inst," +
            "    over_penalty," +
            "    over_other," +
            "    create_time," +
            "    update_time" +
            ") VALUES " +
            "<foreach collection='list' item='item' separator=','>" +
            "    (" +
            "        #{item.businessId}," +
            "        #{item.billMonth}," +
            "        #{item.overPrincipal}," +
            "        #{item.overInst}," +
            "        #{item.overPenalty}," +
            "        #{item.overOther}," +
            "        NOW()," +
            "        NOW()" +
            "    )" +
            "</foreach>" +
            "</script>")
    void batchSave(@Param("list") List<SssjOverdueInfo> list);
}
